// Issue Class
export class AtIssue {
  _id: string; // 问题ID
  title: string; // 标题
  description: string; // 描述
  status: 'Open' | 'Closed' | 'In-Progress'; // 状态
  priority: 'Low' | 'Medium' | 'High'; // 优先级
  createdAt: Date; // 创建时间
  updatedAt: Date; // 更新时间
  reporterId: number; // 报告者ID
  assigneeId: number; // 受分配者ID
  projectId: string; // 项目ID
  teamId: number; // 团队ID

  constructor(params?: Partial<AtIssue>) {
    this.status = 'Open';
    this.priority = 'Low';
    this.createdAt = new Date();
    this.updatedAt = new Date();
    if (params) {
      Object.keys(params).forEach((key) => {
        this[key] = params[key];
      });
    }
  }
}